package com.pcbly.web.bean.system;

import java.util.HashSet;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.pcbly.web.bean.AbstractBaseBean;

public class AuthorityBean extends AbstractBaseBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3979450609567139714L;
	private String name;
	private String descn;

	private String operation;

	private String status;
 

	private Set<ResourceBean> resources = new HashSet<ResourceBean>(0);

	

	public Set<ResourceBean> getResources() {
		return resources;
	}

	public void setResources(Set<ResourceBean> resources) {
		this.resources = resources;
	} 

	public AuthorityBean() {
	}

	public AuthorityBean(String name) {
		this.name = name;
	}

	public AuthorityBean(String name, String descn, String operation,
			String status) {
		this.name = name;
		this.descn = descn;
		this.operation = operation;
		this.status = status; 
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescn() {
		return descn;
	}

	public void setDescn(String descn) {
		this.descn = descn;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		return EqualsBuilder.reflectionEquals(this, object);
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

}
